package com.itcncp.ucenter.dao.model;

import com.alibaba.fastjson.annotation.JSONField;
import com.itcncp.common.plugin.ToStringSerializer;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

public class ItcsExitWhitelistRgt implements Serializable {
    /**
     * 出口白名单流水号
     *
     * @mbg.generated
     */
    @JSONField(serializeUsing= ToStringSerializer.class)
    private Long exitWhitelistId;

    /**
     * 用户id
     *
     * @mbg.generated
     */
    @JSONField(serializeUsing= ToStringSerializer.class)
    private Long userId;

    /**
     * 11位收费路段编号+2位收费站顺序码+1位保留位 
     *
     * @mbg.generated
     */
    private String stationId;

    /**
     * 车牌号
     *
     * @mbg.generated
     */
    private String carPlate;

    /**
     * 用户当前余额
     *
     * @mbg.generated
     */
    private BigDecimal balance;

    /**
     * 车牌颜色，每个车牌车牌1字节表示：
     *
     * @mbg.generated
     */
    private Byte plateColor;

    /**
     * 车牌类型 
     *
     * @mbg.generated
     */
    private Byte carClass;

    /**
     * 请求时间APP支付时间
     *
     * @mbg.generated
     */
    private Date createTime;

    private static final long serialVersionUID = 1L;

    public Long getExitWhitelistId() {
        return exitWhitelistId;
    }

    public void setExitWhitelistId(Long exitWhitelistId) {
        this.exitWhitelistId = exitWhitelistId;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public String getStationId() {
        return stationId;
    }

    public void setStationId(String stationId) {
        this.stationId = stationId;
    }

    public String getCarPlate() {
        return carPlate;
    }

    public void setCarPlate(String carPlate) {
        this.carPlate = carPlate;
    }

    public BigDecimal getBalance() {
        return balance;
    }

    public void setBalance(BigDecimal balance) {
        this.balance = balance;
    }

    public Byte getPlateColor() {
        return plateColor;
    }

    public void setPlateColor(Byte plateColor) {
        this.plateColor = plateColor;
    }

    public Byte getCarClass() {
        return carClass;
    }

    public void setCarClass(Byte carClass) {
        this.carClass = carClass;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", exitWhitelistId=").append(exitWhitelistId);
        sb.append(", userId=").append(userId);
        sb.append(", stationId=").append(stationId);
        sb.append(", carPlate=").append(carPlate);
        sb.append(", balance=").append(balance);
        sb.append(", plateColor=").append(plateColor);
        sb.append(", carClass=").append(carClass);
        sb.append(", createTime=").append(createTime);
        sb.append("]");
        return sb.toString();
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        ItcsExitWhitelistRgt other = (ItcsExitWhitelistRgt) that;
        return (this.getExitWhitelistId() == null ? other.getExitWhitelistId() == null : this.getExitWhitelistId().equals(other.getExitWhitelistId()))
            && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
            && (this.getStationId() == null ? other.getStationId() == null : this.getStationId().equals(other.getStationId()))
            && (this.getCarPlate() == null ? other.getCarPlate() == null : this.getCarPlate().equals(other.getCarPlate()))
            && (this.getBalance() == null ? other.getBalance() == null : this.getBalance().equals(other.getBalance()))
            && (this.getPlateColor() == null ? other.getPlateColor() == null : this.getPlateColor().equals(other.getPlateColor()))
            && (this.getCarClass() == null ? other.getCarClass() == null : this.getCarClass().equals(other.getCarClass()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getExitWhitelistId() == null) ? 0 : getExitWhitelistId().hashCode());
        result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
        result = prime * result + ((getStationId() == null) ? 0 : getStationId().hashCode());
        result = prime * result + ((getCarPlate() == null) ? 0 : getCarPlate().hashCode());
        result = prime * result + ((getBalance() == null) ? 0 : getBalance().hashCode());
        result = prime * result + ((getPlateColor() == null) ? 0 : getPlateColor().hashCode());
        result = prime * result + ((getCarClass() == null) ? 0 : getCarClass().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        return result;
    }
}